Passive optical network communications method, apparatus and system

ABSTRACT

The present invention discloses a passive optical network communications method: reporting, by an optical network unit, ONU, a calibration record of the ONU, where the calibration record includes an ID of a calibrated wavelength channel; sending a first message to the ONU when the OLT determines, according to the calibration record, that a target wavelength channel ID corresponding to a target wavelength channel to which the ONU needs to switch is not in the calibration record, where the first message includes a forced wavelength switching flag; and instructing the ONU to switch to the calibrated target wavelength channel. In this way, the ONU can implement wavelength switching quickly after calibrating a new wavelength channel so as to perform data communication over the calibrated new wavelength channel.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.15/431,390, filed on Feb. 13, 2017, which is a continuation ofInternational Application No. PCT/CN2014/084242, filed on Aug. 13, 2014.All of the afore-mentioned patent applications are hereby incorporatedby reference in their entireties.

TECHNICAL FIELD

Embodiments of the present invention relate to the field of opticalcommunications technologies, and in particular, to a passive opticalnetwork communications method, apparatus and system.

BACKGROUND

A passive optical network (PON) technology is a point-to-multipointfiber access technology. With continuous development of technologies, anEPON (Ethernet Passive Optical Network), a GPON (Gigabit passive OpticalNetwork), an NG PON (next generation PON), and the like emerge. Toensure network reliability, a PON network needs to support fastswitching. FIG. 1 shows a PON network architecture, which includes afirst OLT 10 (Optical Line Terminal), a second OLT 12, an ODN (OpticalDistribution Network), and ONUs (Optical Network Unit). When the firstOLT 10 serves as an active OLT, a feeder fiber between an active port onthe first OLT 10 and the ODN is an active feeder fiber, and a feederfiber between a standby port on the second OLT 12 and the ODN is astandby feeder fiber. In a case in which the active feeder fiber or theactive port is faulty, switching to the standby port needs to beperformed to recover a service and implement protection for the feederfiber.

In order to further extend application of the PON, a time wavelengthdivision multiplexing-passive optical network (TWDM-PON) is put forwardin the industry. The TWDM-PON is a passive optical network that combinesboth WDM and TDM technologies, and includes an office-side OLT, auser-side ONU or ONT (optical network terminal), and an ODN.

After initial access to a system, an existing ONU performs automaticcalibration to implement alignment of all available receive and transmitwavelengths of the OLT. However, when new wavelength channels arerequired subsequently due to a gradual increase of users and a servicescale, the new wavelength channels are not calibrated by the ONU, sothat the ONU is unable to switch to a new wavelength channel to performdata communication, which further leads to inefficient use of the newwavelength channels and drastic waste of bandwidth.

SUMMARY

Embodiments of the present invention provide a PON communicationsmethod, and a related device and system to solve an issue of performingdata communication by using a new wavelength channel, which enables anONU to implement wavelength switching quickly after calibrating a newwavelength channel so as to perform data communication over thecalibrated new wavelength channel, thereby expanding capacity of asystem effectively by using the new wavelength channel and improving abandwidth utilization rate of the system.

According to a first aspect, data communications method in a passiveoptical network is provided, where the method includes: receiving, by anoptical line terminal OLT, a calibration record reported by an opticalnetwork unit ONU, where the calibration record includes an ID of acalibrated wavelength channel; sending a first message to the ONU whenthe OLT determines, according to the calibration record, that a targetwavelength channel ID corresponding to a target wavelength channel towhich the ONU needs to switch is not in the calibration record, wherethe first message includes a forced wavelength switching flag, where theforced wavelength switching flag is used to instruct the ONU to performwavelength channel calibration for the target wavelength channel toswitch to and instruct the ONU to switch to the calibrated targetwavelength channel; and receiving data sent by the ONU over thecalibrated target wavelength channel.

With reference to the first aspect, in a first possible implementationmanner of the first aspect, the first message further includes a forcedcalibration flag that is used to instruct the ONU to switch to thetarget wavelength channel after calibrating all new wavelength channels,where new wavelength channel IDs corresponding to the new wavelengthchannels are not in the calibration record, and the new wavelengthchannels include the target wavelength channel.

With reference to the first aspect, in a second possible implementationmanner of the first aspect, the receiving, by an OLT, a calibrationrecord reported by an ONU specifically includes:

sending, by the OLT, a second message to the ONU, where the secondmessage includes a quiet window and is used to instruct the ONU toregister within the quiet window; and

receiving, within the quiet window, a registration request reported bythe ONU, where the registration request includes a sequence number ofthe ONU and the calibration record.

With reference to the first aspect, in a third possible implementationmanner of the first aspect, the calibration record includes at least oneof an ID of a calibrated upstream wavelength channel and an ID of acalibrated downstream wavelength channel.

With reference to the first aspect, in a fourth possible implementationmanner of the first aspect, the calibration record further includes atleast one of a quantity of calibrated downstream wavelength channels anda quantity of calibrated upstream wavelength channels.

With reference to the first aspect, in a fifth possible implementationmanner of the first aspect, the method further includes: determining, bythe OLT according to the calibration record, that an OLT-expectedwavelength channel ID is in the calibration record, and then allowingthe ONU to register, where the OLT-expected wavelength channel ID is anoperating wavelength channel ID allocated by the OLT to the ONU.

With reference to the first aspect, in a sixth possible implementationmanner of the first aspect, the method further includes: sending a thirdmessage to the ONU when an OLT-expected wavelength channel ID is not inthe calibration record, so as to request the ONU to perform wavelengthchannel calibration for a wavelength channel identified by theOLT-expected wavelength channel ID, where the OLT-expected wavelengthchannel ID is an operating wavelength channel ID allocated by the OLT tothe ONU.

With reference to the first aspect, in a seventh possible implementationmanner of the first aspect, the third message further includes anexpected wavelength channel indication bit and is used to instruct theONU to perform wavelength channel calibration for the OLT-expectedwavelength channel and use the calibrated OLT-expected wavelengthchannel as an operating wavelength channel of the ONU.

With reference to the first aspect, in an eighth possible implementationmanner of the first aspect, the method further includes: sending afourth message to the ONU when an OLT-expected wavelength channel ID isnot in the calibration record, where the fourth message includes awavelength channel calibration indication bit and is used to instructthe ONU to calibrate all new wavelength channels or instruct the ONU tocalibrate a specified new wavelength channel, where the all newwavelength channels include an OLT-expected wavelength channelidentified by the OLT-expected wavelength channel ID and the specifiednew wavelength channel, and the specified new wavelength channel isdetermined according to an ID of a to-be-calibrated wavelength channelin the fourth message or determined according to a quantity ofto-be-calibrated wavelength channels and IDs of the to-be-calibratedwavelength channels in the fourth message.

With reference to the first aspect, in a ninth possible implementationmanner of the first aspect, the method further includes: sending a fifthmessage to the ONU when an OLT-expected wavelength channel ID is not inthe calibration record, where the fifth message includes an ONUdeactivation indication bit and is used to instruct the ONU to getdeactivated and then calibrate all new wavelength channels beforere-registration, where the all new wavelength channels include anOLT-expected wavelength channel identified by the OLT-expectedwavelength channel ID.

According to a second aspect, a data communications method in a passiveoptical network is provided, where the method includes:

reporting, by an optical network unit ONU, a calibration record to anoptical line terminal OLT, where the calibration record includes an IDof a calibrated wavelength channel;

receiving, by the ONU, a first message sent by the OLT, where the firstmessage includes a forced wavelength switching flag; performing, by theONU according to the forced wavelength switching flag, wavelengthchannel calibration for a target wavelength channel to switch to, andswitching to the calibrated target wavelength channel; and performing,by the ONU, data communication with the OLT over the switched-to targetwavelength channel.

With reference to the second aspect, in a first possible implementationmanner of the second aspect, the first message further includes a forcedcalibration flag, and

the method further includes:

calibrating, by the ONU, all new wavelength channels according to theforced calibration flag, and switching to the target wavelength channel,where new wavelength channel IDs corresponding to the new wavelengthchannels are not in the calibration record, and the new wavelengthchannels include the target wavelength channel.

With reference to the second aspect, in a second possible implementationmanner of the second aspect, the reporting, by an ONU, a calibrationrecord to an OLT specifically includes:

receiving, by the ONU, a second message sent by the OLT, where thesecond message includes a quiet window; sending, by the ONU within thequiet window, a registration request to the OLT, where the registrationrequest includes a sequence number of the ONU and the calibrationrecord, where the calibration record is generated by the ONU; andreceiving, within the quiet window, the sequence number of the ONU andthe calibration record that are reported by the ONU.

With reference to the second aspect, in a third possible implementationmanner of the second aspect, the calibration record includes at leastone of an ID of a calibrated upstream wavelength channel and an ID of acalibrated downstream wavelength channel.

With reference to the second aspect, in a fourth possible implementationmanner of the second aspect, the calibration record further includes atleast one of a quantity of calibrated downstream wavelength channels anda quantity of calibrated upstream wavelength channels.

the method further includes:

receiving, by the ONU, a third message sent by the OLT; and

With reference to the second aspect, in a fourth possible implementationmanner of the second aspect, the method further includes:

performing, by the ONU according to the third message, wavelengthchannel calibration for a wavelength channel identified by anOLT-expected operating wavelength channel ID, where the OLT-expectedwavelength channel ID is an operating wavelength channel ID allocated bythe OLT to the ONU.

With reference to the second aspect and the fourth possibleimplementation manner of the second aspect, in a fourth possibleimplementation manner of the second aspect, the third message furtherincludes an expected wavelength channel indication bit; and

the method further includes:

performing, by the ONU according to the expected wavelength channelindication bit, wavelength channel calibration for the OLT-expectedwavelength channel and using the calibrated OLT-expected wavelengthchannel as an operating wavelength channel of the ONU.

With reference to the second aspect, in a fifth possible implementationmanner of the second aspect, the method further includes:

receiving, by the ONU, a fourth message sent by the OLT, where thefourth message includes a wavelength channel calibration indication bit;and calibrating, by the ONU, all new wavelength channels according tothe wavelength channel calibration indication bit; or calibrating, bythe ONU, a specified new wavelength channel according to the wavelengthchannel calibration indication bit, where the all new wavelengthchannels include an OLT-expected wavelength channel identified by anOLT-expected wavelength channel ID and the specified new wavelengthchannel, and the specified new wavelength channel is a wavelengthchannel specified according to an ID of a to-be-calibrated wavelengthchannel in the fourth message or is a wavelength channel specifiedaccording to a quantity of to-be-calibrated wavelength channels and IDsof the to-be-calibrated wavelength channels in the fourth message.

With reference to the second aspect, in a sixth possible implementationmanner of the second aspect, the method further includes:

receiving, by the ONU, a fourth message sent by the OLT, where thefourth message includes a wavelength channel calibration indication bit;and calibrating, by the ONU, all new wavelength channels according tothe wavelength channel calibration indication bit; or calibrating, bythe ONU, a specified new wavelength channel according to the wavelengthchannel calibration indication bit, where the all new wavelengthchannels include an OLT-expected wavelength channel identified by anOLT-expected wavelength channel ID and the specified new wavelengthchannel, and the specified new wavelength channel is a wavelengthchannel specified according to an ID of a to-be-calibrated wavelengthchannel in the fourth message or is a wavelength channel specifiedaccording to a quantity of to-be-calibrated wavelength channels and IDsof the to-be-calibrated wavelength channels in the fourth message.

With reference to the second aspect, in a seventh possibleimplementation manner of the second aspect, the method further includes:

receiving, by the ONU, a fifth message sent by the OLT, where the fifthmessage includes an ONU deactivation indication bit; and calibrating, bythe ONU, all new wavelength channels according to the ONU deactivationindication bit before re-registration, where the new wavelength channelsinclude an OLT-expected wavelength channel identified by an OLT-expectedwavelength channel ID, where the OLT-expected wavelength channel ID isan operating wavelength channel ID allocated by the OLT to the ONU.

According to a third aspect, a passive optical network communicationsapparatus is provided, where the communications apparatus includes:

a first communications unit, configured to: receive a calibration recordreported by an optical network unit ONU, where the calibration recordincludes an ID of a calibrated wavelength channel; send a first messageto the ONU according to an instruction of a first processing unit, wherethe first message includes a forced wavelength switching flag, where theforced wavelength switching flag is used to instruct the ONU to performwavelength channel calibration for a target wavelength channel to switchto and instruct the ONU to switch to the calibrated target wavelengthchannel; and receive data sent by the ONU over the calibrated targetwavelength channel; and the first processing unit, configured to: whenthe OLT determines, according to the calibration record, that a targetwavelength channel ID corresponding to the target wavelength channel towhich the ONU needs to switch is not in the calibration record, instructthe first communications unit to send the first message to the ONU.

For details of other implementation manners of the third aspect,reference may be made to the method provided in the implementationmanners of the first aspect.

According to a fourth aspect, a passive optical network communicationsapparatus is provided, where the communications apparatus includes:

a second communications unit, configured to: report a calibration recordto an optical line terminal OLT, where the calibration record includesan ID of a calibrated wavelength channel;

and receive a first message sent by the OLT, where the first messageincludes a forced wavelength switching flag; and a second processingunit, configured to: perform, according to the forced wavelengthswitching flag, wavelength channel calibration for a target wavelengthchannel to switch to, and switch to the calibrated target wavelengthchannel; and perform, by the ONU, data communication with the OLT overthe switched-to target wavelength channel.

For details of other implementation manners of the fourth aspect,reference may be made to the method provided in the implementationmanners of the second aspect.

According to a fifth aspect, a passive optical network system isprovided, where the system includes the apparatus provided in the thirdaspect and the apparatus provided in the fourth aspect.

From the foregoing description, it can be seen that, in theimplementation manners of the present invention, an ONU reports acalibration record of the ONU, where the calibration record includes anID of a calibrated wavelength channel; an OLT sends a first message tothe ONU when determining, according to the calibration record, that atarget wavelength channel ID corresponding to a target wavelengthchannel to which the ONU needs to switch is not in the calibrationrecord, where the first message includes a forced wavelength switchingflag; the ONU performs, according to the forced wavelength switchingflag, wavelength channel calibration for the target wavelength channelto switch to, and instructs the ONU to switch to the calibrated targetwavelength channel. In this way, the ONU can implement wavelengthswitching quickly after calibrating a new wavelength channel so as toperform data communication over the calibrated new wavelength channel,thereby expanding a capacity of a system by effectively using the newwavelength channel and improving bandwidth utilization of the system.

BRIEF DESCRIPTION OF DRAWINGS

To describe the technical solutions in the embodiments of the presentinvention more clearly, the following briefly introduces theaccompanying drawings required for describing the embodiments and theprior art. Apparently, the accompanying drawings in the followingdescription show merely some embodiments of the present invention, and aperson of ordinary skill in the art may still derive other drawings fromthese accompanying drawings without creative efforts.

FIG. 1 is a schematic diagram of a network architecture of a TWDM-PONsystem according to an embodiment of the present invention;

FIG. 2 is a data communications method in a passive optical networkaccording to an embodiment of the present invention;

FIG. 3 is a schematic flowchart of an ONU registration method of apassive optical network according to an embodiment of the presentinvention;

FIG. 4 is a schematic flowchart of a wavelength channel switching methodaccording to an embodiment of the present invention;

FIG. 5 shows a method for wavelength channel calibration of an ONUaccording to an embodiment of the present invention;

FIG. 6 shows another method for wavelength channel calibration of an ONUaccording to an embodiment of the present invention;

FIG. 7 is a communications apparatus architecture diagram of a passiveoptical network according to an embodiment of the present invention;

FIG. 8 is another communications apparatus architecture diagram of apassive optical network according to an embodiment of the presentinvention; and

FIG. 9 is a schematic structural diagram of still another communicationsapparatus according to the present invention.

DESCRIPTION OF EMBODIMENTS

Embodiments of the present invention provide a PON communicationsmethod, related devices, and a PON to improve available efficiency of alink between PON devices in a PON and improve a data transmission rate.

To make the invention objectives, features, and advantages of thepresent invention clearer and more comprehensible, the following clearlyand completely describes the technical solutions in the embodiments ofthe present invention with reference to the accompanying drawings in theembodiments of the present invention. Apparently, the embodimentsdescribed in the following are merely a part rather than all of theembodiments of the present invention. All other embodiments obtained bya person of ordinary skill in the art based on the embodiments of thepresent invention without creative efforts shall fall within theprotection scope of the present invention.

FIG. 1 is a schematic diagram of a network architecture of a TWDM-PONsystem. As shown in FIG. 1, a TWDM-PON system 100 includes one OLT 110,multiple ONUs 120, and an optical distribution network (ODN) 130, wherethe OLT 110 is connected to the multiple ONUs 120 via the ODN 130 in apoint-to-multipoint manner. The TWDM-PON system 100 may further includemore than one OLT. The multiple ONUs 120 share an optical transmissionmedium of the ODN 130. The ODN 130 may include a feeder fiber 131, anoptical power splitting module 132, and multiple distribution fibers133. The optical power splitting module 132 may be disposed on a remotenode (Remote Node, RN), and is connected to the OLT 110 by using thefeeder fiber 131 and also connected to the multiple ONUs 120 by usingthe multiple distribution fibers 133. In the TWDM-PON system 100, acommunications link between the OLT 110 and the multiple ONUs 120 mayinclude multiple operating wavelength channels, and the multipleoperating wavelength channels share the optical transmission medium ofthe ODN 130 in a WDM manner. Each ONU 120 may work on one operatingwavelength channel of the TWDM-PON system 100, and each operatingwavelength channel may carry services of one or more ONUs 120. Inaddition, ONUs 120 that work on a same operating wavelength channel mayshare the wavelength channel in a time division multiplexing TDM manner.In FIG. 1, that the TWDM-PON system 100 has four operating wavelengthchannels is used as an example for description. It should be understoodthat, in practical application, a quantity of operating wavelengthchannels of the TWDM-PON system 100 may also be determined according toa network need.

It should be understood that, in the embodiments of the presentinvention, a transmission direction in which data or an optical signalthat carries the data is transmitted from an OLT to an ONT/ONU is calleda downstream direction, and correspondingly, the optical signal sent bythe OLT to the ONT/ONU is also called a downstream optical signal.Similarly, a transmission direction in which data or an optical signalthat carries the data is transmitted from the ONT/ONU to the OLT iscalled an upstream direction, and correspondingly, the optical signalsent by the ONT/ONU to the OLT is also called an upstream opticalsignal.

For ease of description, the four operating wavelength channels of theTWDM-PON system 100 in FIG. 1 are named operating wavelength channel 1,operating wavelength channel 2, operating wavelength channel 3, andoperating wavelength channel 4. Each operating wavelength channel usesone pair of upstream and downstream wavelengths. For example, operatingwavelength channel 1 includes an upstream operating wavelength channeland a downstream operating wavelength channel, where an upstreamoperating wavelength corresponding to the upstream operating wavelengthchannel is λup1, and a downstream operating wavelength corresponding tothe downstream operating wavelength channel may be λdn1; operatingwavelength channel 2 includes an upstream operating wavelength channeland a downstream operating wavelength channel, where an upstreamoperating wavelength corresponding to the upstream operating wavelengthchannel is λup2, and a downstream operating wavelength corresponding tothe downstream operating wavelength channel may be λdn2; operatingwavelength channel 3 includes an upstream operating wavelength channeland a downstream operating wavelength channel, where an upstreamoperating wavelength corresponding to the upstream operating wavelengthchannel is λup3, and a downstream operating wavelength corresponding tothe downstream operating wavelength channel may be λdn3; operatingwavelength channel 4 includes an upstream operating wavelength channeland a downstream operating wavelength channel, where an upstreamoperating wavelength corresponding to the upstream operating channel isλup4, and a downstream operating wavelength corresponding to thedownstream operating wavelength channel is λdn4. Each operatingwavelength channel may have a corresponding operating wavelength channelID (for example, channel numbers of the four wavelength channels may be1, 2, 3, and 4). That is, an operating wavelength channel ID is in amatching relationship with an upstream or a downstream wavelengthcorresponding to an operating wavelength channel identified by theoperating wavelength channel ID, and the OLT 110 and the ONUs 120 canlearn, according to an operating wavelength channel ID, an upstreamoperating wavelength and a downstream operating wavelength that arecorresponding to an operating wavelength channel.

The OLT 110 may include an optical coupler 111, a first wavelengthdivision multiplexer 112, a second wavelength division multiplexer 113,multiple downstream optical transmitters Tx1-Tx4, multiple upstreamoptical receivers Rx1-Rx4, and a processing module 114. The multipledownstream optical transmitters Tx1-Tx4 are connected to the opticalcoupler 111 via the first wavelength division multiplexer 112, themultiple upstream optical receivers Rx1-Rx4 are connected to the opticalcoupler 111 via the second wavelength division multiplexer 113, and thecoupler 111 is further connected to the feeder fiber 131 of the ODN 130.

Transmit wavelengths vary between the multiple downstream opticaltransmitters Tx1-Tx4. Each downstream optical transmitter of Tx1-Tx4 maycorrespond to one wavelength channel of the TWDM-PON system 100. Forexample, the transmit wavelengths of the multiple downstream opticaltransmitters Tx1-Tx4 may be λd1-λd4 respectively. The downstream opticaltransmitters Tx1-Tx4 may use their respective transmit wavelengthsλd1-λd4 to transmit downstream data to corresponding wavelength channelsso that the downstream data can be received by the ONUs 120 that work onthe corresponding wavelength channels. Correspondingly, receivewavelengths may vary between the multiple upstream optical receiversRx1-Rx4. Each upstream optical receiver of Rx1-Rx4 also corresponds toone wavelength channel of the TWDM-PON system 100. For example, thereceive wavelengths of the multiple upstream optical receivers Rx1-Rx4may be λu1-λu4 respectively. The upstream optical receivers Rx1-Rx4 mayuse their respective receive wavelengths λu1-λu4 to receive upstreamdata sent by the ONUs 120 that work on corresponding wavelengthchannels.

The first wavelength division multiplexer 112 is configured to performwavelength division multiplexing for the downstream data that istransmitted by the multiple downstream optical transmitters Tx1-Tx4 andwhose wavelengths are λd1-λd4, and send the downstream data to thefeeder fiber 131 of the ODN 130 via the optical coupler 111, so as toprovide the downstream data for the ONUs 120 via the ODN 130. Inaddition, the optical coupler 111 may be further configured to providethe second wavelength division multiplexer 113 with the upstream datathat comes from the multiple ONUs 120 and whose wavelengths are λu1-λu4,and the second wavelength division multiplexer 113 may demultiplex theupstream data whose wavelengths are λu1-λu4 to the upstream opticalreceivers Rx1-Rx4 so as to implement data reception.

The processing module 114 may be a media access control (MAC) module. Onthe one hand, the processing module may specify operating wavelengthchannels for the multiple ONUs 120 by means of wavelength negotiation,and according to an operating wavelength channel of one ONU 120, providedownstream data, which is to be sent to the ONU 120, for the downstreamoptical transmitters Tx1-Tx4 corresponding to the wavelength channel, sothat the downstream optical transmitters Tx1-Tx4 transmit the downstreamdata to the corresponding wavelength channel; on the other hand, theprocessing module 114 may further perform dynamic bandwidth allocation(DBA) for upstream transmission for each wavelength channel, andallocate an upstream transmit timeslot to ONUs 120 that are multiplexedto a same wavelength channel in a TDM manner, so as to authorize theONUs 120 to send upstream data in the specified timeslot through thecorresponding wavelength channel.

The upstream transmit wavelength and the downstream receive wavelengthof each ONU 120 are adjustable. According to a wavelength channelspecified by the OLT 110, an ONU 120 may adjust its own upstreamtransmit wavelength and downstream receive wavelength respectively to anupstream operating wavelength and a downstream operating wavelength thatare corresponding to the operating wavelength channel, so as toimplement upstream and downstream data transmission and reception byusing the wavelength channel. For example, if the OLT 110 instructs, ina wavelength negotiation process, one ONU 120 to work on wavelengthchannel 1, the ONU 120 may adjust its own upstream transmit wavelengthand downstream receive wavelength to a first upstream operatingwavelength λup1 and a first downstream operating wavelength λdn1respectively; if the OLT 110 instructs the ONU 120 to work on wavelengthchannel 3, the ONU 120 may adjust its own upstream transmit wavelengthand downstream receive wavelength to a third upstream operatingwavelength λup3 and a third downstream operating wavelength λdn3respectively.

The ONU 120 may include an optical coupler 121, a downstream opticalreceiver 122, an upstream optical transmitter 123, and a processingmodule 124. The downstream optical receiver 122 and the upstream opticaltransmitter 123 are connected to a distribution fiber 133 correspondingto the ONU 120 via the optical coupler 121. On the one hand, the opticalcoupler 121 may provide the distribution fiber 133 of the ODN 130 withupstream data sent by the upstream optical transmitter 123, so as tosend the upstream data to the OLT 110 via the ODN 130; on the otherhand, the optical coupler 121 may further provide the downstream opticalreceiver 122 with downstream data sent by the OLT 110 via the ODN 130,so as to implement data reception.

The processing module 124 may be a media access control MAC module or amicroprocessor, and may perform wavelength negotiation with the OLT 110,and according to an operating wavelength channel specified by the OLT110, adjust a receive wavelength of the downstream optical receiver 122and a transmit wavelength of the upstream optical transmitter 123 (thatis, adjust the downstream receive wavelength and upstream transmitwavelength of the ONU 120), so that the ONU 120 works on the operatingwavelength channel specified by the OLT 110. In addition, the processingmodule 124 may further control, according to a dynamic bandwidthallocation result of the OLT 110, the upstream optical transmitter 123to send upstream data in a specified timeslot.

It should be understood that in the embodiments of the presentinvention, the passive optical network communications method, apparatusand system according to the embodiments of the present invention may beapplied in a time division or wavelength division passive opticalnetwork system, for example, a GPON system, a 10G GPON system, a 40GGPON system, an Ethernet passive optical network (EPON) system, a 10GEPON system or a wavelength division multiplexing passive opticalnetwork WDM PON system. For ease of description, a GPON system is usedas an example for description below, but the present invention is notlimited thereto. In addition, for ease of description, an opticalnetwork unit (ONU) is used for description below in place of an opticalnetwork terminal (ONT) and/or an optical network unit, but the presentinvention is not limited thereto.

Embodiment 1

As shown in FIG. 2, FIG. 2 is a data communications method in a passiveoptical network according to an embodiment of the present invention. Themethod may be based on the foregoing network architecture in FIG. 1. Themethod includes:

S200. An ONU reports a calibration record, where the calibration recordincludes an ID of a calibrated wavelength channel.

Further, that an ONU reports a calibration record specifically includes:

sending, by an OLT, a second message to the ONU, where the secondmessage includes a quiet window and is used to instruct the ONU toregister within the quiet window; and

receiving, within the quiet window, a registration request reported bythe ONU, where the registration request includes a sequence number ofthe ONU and the calibration record.

Further, the calibration record includes at least one of an ID of acalibrated upstream wavelength channel and an ID of a calibrateddownstream wavelength channel.

Further, the calibration record further includes at least one of aquantity of calibrated downstream wavelength channels and a quantity ofcalibrated upstream wavelength channels.

S202. The ONU reports the calibration record to an OLT.

Further, that the ONU reports the calibration record to an OLTspecifically includes:

receiving, by the ONU, a second message sent by the OLT, where thesecond message includes a quiet window;

sending, by the ONU within the quiet window, a registration request tothe OLT, where the registration request includes a sequence number ofthe ONU and the calibration record, where the calibration record isgenerated by the ONU; and

receiving, within the quiet window, the sequence number of the ONU andthe calibration record that are reported by the ONU.

S204. The OLT receives the calibration record reported by the ONU.

Further, the method may further include: determining, by the OLTaccording to the calibration record, that an OLT-expected wavelengthchannel ID is in the calibration record, and then allowing the ONU toregister, where the OLT-expected wavelength channel ID is an operatingwavelength channel ID allocated by the OLT to the ONU.

S206. The OLT sends a first message to the ONU when the OLT determines,according to the calibration record, that a target wavelength channel IDcorresponding to a target wavelength channel to which the ONU needs toswitch is not in the calibration record, where the first messageincludes a forced wavelength switching flag, where the forced wavelengthswitching flag is used to instruct the ONU to perform wavelength channelcalibration for the target wavelength channel to switch to and instructthe ONU to switch to the calibrated target wavelength channel.

Further, the first message further includes a forced calibration flagthat is used to instruct the ONU to switch to the target wavelengthchannel after calibrating all new wavelength channels, where newwavelength channel IDs corresponding to the new wavelength channels arenot in the calibration record, and the new wavelength channels includethe target wavelength channel.

Further, the OLT sends a second message to the ONU, where the secondmessage includes a quiet window and is used to instruct the ONU toregister within the quiet window; and

receives, within the quiet window, a registration request reported bythe ONU, where the registration request includes a sequence number ofthe ONU and the calibration record.

Further, a third message is sent to the ONU when an OLT-expectedwavelength channel ID is not in the calibration record, so as to requestthe ONU to perform wavelength channel calibration for a wavelengthchannel identified by the OLT-expected wavelength channel ID, where theOLT-expected wavelength channel ID is an operating wavelength channel IDallocated by the OLT to the ONU.

The third message further includes an expected wavelength channelindication bit and is used to instruct the ONU to perform wavelengthchannel calibration for the OLT-expected wavelength channel and use thecalibrated OLT-expected wavelength channel as an operating wavelengthchannel of the ONU.

Further, a method used by the ONU to calibrate the new wavelengthchannels may further specifically include:

sending a fourth message to the ONU when an OLT-expected wavelengthchannel ID is not in the calibration record, where the fourth messageincludes a wavelength channel calibration indication bit and is used toinstruct the ONU to calibrate all new wavelength channels or instructthe ONU to calibrate a specified new wavelength channel, where the allnew wavelength channels include an OLT-expected wavelength channelidentified by the OLT-expected wavelength channel ID and the specifiednew wavelength channel, and the specified new wavelength channel isdetermined according to an ID of a to-be-calibrated wavelength channelin the fourth message or determined according to a quantity ofto-be-calibrated wavelength channels and IDs of the to-be-calibratedwavelength channels in the fourth message.

Further, the method used by the ONU to calibrate the new wavelengthchannels may further specifically include:

sending a fifth message to the ONU when an OLT-expected wavelengthchannel ID is not in the calibration record, where the fifth messageincludes an ONU deactivation indication bit and is used to instruct theONU to get deactivated and then calibrate all new wavelength channelsbefore re-registration, where the all new wavelength channels include anOLT-expected wavelength channel identified by the OLT-expectedwavelength channel ID.

S208. The ONU receives the first message, and according to the forcedwavelength switching flag, performs wavelength channel calibration for atarget wavelength channel to switch to, and instructs the ONU to switchto the calibrated target wavelength channel.

Further, the first message further includes a forced calibration flag;and

the method further includes:

calibrating, by the ONU, all new wavelength channels according to theforced calibration flag, and switching to the target wavelength channel,where new wavelength channel IDs corresponding to the new wavelengthchannels are not in the calibration record, and the new wavelengthchannels include the target wavelength channel.

Further, the ONU receives a third message sent by the OLT; and

the method further includes:

performing, by the ONU according to the third message, wavelengthchannel calibration for a wavelength channel identified by anOLT-expected operating wavelength channel ID, where the OLT-expectedwavelength channel ID is an operating wavelength channel ID allocated bythe OLT to the ONU.

Further, the third message further includes an expected wavelengthchannel indication bit; and

the method further includes:

performing, by the ONU according to the expected wavelength channelindication bit, wavelength channel calibration for the OLT-expectedwavelength channel and using the calibrated OLT-expected wavelengthchannel as an operating wavelength channel of the ONU.

Further, the ONU receives a fourth message sent by the OLT, where thefourth message includes a wavelength channel calibration indication bit;and

the ONU calibrates all new wavelength channels according to thewavelength channel calibration indication bit; or

the ONU calibrates a specified new wavelength channel according to thewavelength channel calibration indication bit, where the all newwavelength channels include an OLT-expected wavelength channelidentified by an OLT-expected wavelength channel ID and the specifiednew wavelength channel, and the specified new wavelength channel is awavelength channel specified according to an ID of a to-be-calibratedwavelength channel in the fourth message or is a wavelength channelspecified according to a quantity of to-be-calibrated wavelengthchannels and IDs of the to-be-calibrated wavelength channels in thefourth message.

Further, the ONU receives a fifth message sent by the OLT, where thefifth message includes an ONU deactivation indication bit; and

the ONU calibrates all new wavelength channels according to the ONUdeactivation indication bit before re-registration, where the newwavelength channels include an OLT-expected wavelength channelidentified by an OLT-expected wavelength channel ID, where theOLT-expected wavelength channel ID is an operating wavelength channel IDallocated by the OLT to the ONU.

S210. The OLT performs data communication with the ONU over thecalibrated target wavelength channel.

In this embodiment of the present invention, an ONU reports acalibration record of the ONU, where the calibration record includes anID of a calibrated wavelength channel; an OLT sends a first message tothe ONU when determining, according to the calibration record, that atarget wavelength channel ID corresponding to a target wavelengthchannel to which the ONU needs to switch is not in the calibrationrecord, where the first message includes a forced wavelength switchingflag; the ONU performs, according to the forced wavelength switchingflag, wavelength channel calibration for the target wavelength channelto switch to, and instructs the ONU to switch to the calibrated targetwavelength channel. In this way, the ONU can implement wavelengthswitching quickly after calibrating a new wavelength channel so as toperform data communication over the calibrated new wavelength channel,thereby expanding a capacity of a system by effectively using the newwavelength channel and improving bandwidth utilization of the system.

The following uses Embodiment 2, Embodiment 3 and Embodiment 4 to givemore details about the communications method provided in the foregoingembodiment, where the details are given based on the networkarchitecture provided in FIG. 1 and according to the communicationsmethod provided in Embodiment 1. Specifically, Embodiment 2 is used todetail an ONU registration authentication process performed by an OLTaccording to a calibration record reported by an ONU; Embodiment 3 isused to detail a process in which an ONU switches, after calibrating anOLT-expected wavelength channel, to the expected wavelength channel;Embodiment 4 is used to detail a process of calibration performed by anONU for a new wavelength channel.

Embodiment 2

FIG. 3 gives a schematic flowchart of an ONU registration method of apassive optical network according to an embodiment of the presentinvention. The method may be applied in the network architecture shownin FIG. 1, and the method may be executed by an apparatus that executesthe communications method. For example, the method may be executed by anONU or an OLT. As shown in FIG. 3, the method includes:

S300. An OLT sends, over multiple downstream wavelength channels, afirst message that carries a quiet window, where the first message isused to instruct an unregistered ONU to register within the quietwindow.

The first message may be any one of the following messages: a physicallayer operation, administration and maintenance (PLOAM) message, an ONTmanagement and control interface (OMCI) message, a Multi-Point ControlProtocol (MPCP) message, and an operation, administration andmaintenance (OAM) message, or may be other messages.

S302. The unregistered ONU performs downstream wavelengthself-calibration, generates a first entry in a calibration record, andthen selects a calibrated downstream wavelength channel in the firstentry of the calibration record as an initial downstream operatingwavelength channel, and receives, over the initial downstream operatingwavelength channel, the first message delivered by the OLT.

A specific process of generating the first entry in the calibrationrecord is as follows:

If an ONU type is an ONU whose wavelengths are pre-calibrated atdelivery, the ONU traverses pre-calibrated downstream wavelengths, andestablishes a correspondence between the downstream wavelengths anddownstream wavelength channels; and if an ONU type is an ONU whosewavelengths are not calibrated at delivery, the ONU performs wavelengthscan (the ONU changes the downstream wavelength continuously accordingto a specific step size), and establishes a correspondence betweendownstream wavelengths and downstream wavelength channels. Thedownstream wavelength channel in the correspondence is determined by theONU according to a received downstream wavelength channel ID that isbroadcast by the OLT.

Further, the ONU uses an ID corresponding to a downstream wavelengthchannel in the established correspondence, that is, a downstreamwavelength channel ID, as the first entry of the calibration record.

The specific process of generating the first entry in the calibrationrecord is applicable to both unregistered ONUs and registered ONUs.

S304. The unregistered ONU reports a second message to the OLT withinthe quiet window specified in the first message, where the secondmessage includes an SN and the calibration record, and the calibrationrecord includes the first entry and/or a second entry, where the firstentry includes an ID of the calibrated downstream wavelength channel andthe second entry includes an ID of a calibrated upstream wavelengthchannel.

Specifically, after generating the second entry in the calibrationrecord, the ONU uses the second message to carry the calibration recordthat includes the first entry generated in the foregoing step S302 andthe generated second entry, and sends the second message to the OLT.

A specific process of generating the second entry in the calibrationrecord is as follows:

If an ONU type is an ONU whose wavelengths are pre-calibrated atdelivery, the ONU traverses pre-calibrated upstream wavelengths, andestablishes a correspondence between the upstream wavelengths andupstream wavelength channels; and if an ONU type is an ONU whosewavelengths are not calibrated at delivery, the ONU performs wavelengthscan (the ONU changes the upstream wavelength continuously according toa specific step size), and establishes a correspondence between upstreamwavelengths and upstream wavelength channels. The upstream wavelengthchannel in the correspondence is determined by the OLT by performingdetection according to an optical signal sent by the ONU.

A specific process of determining the upstream wavelength channel by theOLT is:

The OLT receives an optical signal sent by the ONU, determines anupstream wavelength channel that receives the optical signal, anddelivers an ID corresponding to the determined upstream wavelengthchannel to the ONU, so that the ONU establishes a correspondence betweenthe upstream wavelength and the upstream wavelength channel, where theupstream wavelength channel is an upstream wavelength channelcorresponding to the upstream channel ID.

Further, the ONU uses an ID corresponding to an upstream wavelengthchannel in the established correspondence, that is, an upstreamwavelength channel ID, as the second entry of the calibration record.

The specific process of generating the second entry in the calibrationrecord is applicable to both unregistered ONUs and registered ONUs.

Further, the second message may be any one of: a PLOAM message, an OMCImessage, an MPCP message or an OAM message, or may be other messages.

The ONU may use any one of the PLOAM message, the OMCI message, the MPCPmessage or the OAM message or other types of messages to carry the SNand the calibration record.

That a PLOAM message is used to carry the SN and the calibration recordis used as an example, and a message format of the PLOAM message isshown in Table 1.

TABLE 1 Octet (Octet) Content (Content) Description (Description) 1-2ONU ID ID of an optical network unit (ONU ID) that needs to switch to abackup wavelength channel 3 Message type ID Identifies a type of the(Message type ID) message 4 Sequence number Sequence number (SequenceNo)  5-40 Message content May be used to carry the (Message Content)“calibration record” 41-48 Message integrity check Message integritycheck (MIC)

Table 1 is a schematic diagram of a PLOAM message format. The PLOAMmessage generally includes an optical network unit ID (ONU ID) field, amessage type ID field, a sequence number field, a message content field,and a message integrity check field. In this embodiment of the presentinvention, the SN and the calibration record may be carried in themessage content field of the PLOAM message, as shown in Table 1.

Specifically, a message format, in which the message content in octets5-40 in Table 1 carries the SN and the calibration record, may be shownin Table 2.

TABLE 2 Octet Content Description 1-2 0x03FF No ONU ID is allocated tothe ONU yet 3 0x01 ONU sequence number 4 0x00 Message sequence number 5-16 . . . . . . 17 0000 00TT TT: Calibration type of the ONU(optional) TT = 00: ONU whose wavelengths are not calibrated at deliveryTT = 01: ONU whose wavelengths are pre-calibrated at delivery 18 AAAABBBB AAAA: quantity of calibrated downstream wavelength channels BBBB:quantity of calibrated upstream wavelength channels 19 0000 DDDD ID of acalibrated downstream wavelength channel . . . . . . . . . . . . 0000UUUU ID of a calibrated upstream wavelength channel . . . . . . . . .41-48 Message integrity Message integrity check check

In the foregoing Table 2, octets 19−n (n is an integer, and n>19) arenew mandatory fields, octets 19−n are filled with a “calibrationrecord”, where the calibration record further includes an ID of acalibrated wavelength channel, where the ID of the calibrated wavelengthchannel may include an ID of a calibrated downstream wavelength channelor an ID of a calibrated upstream wavelength channel; or the ID of acalibrated wavelength channel includes an ID of a calibrated downstreamwavelength channel and an ID of a calibrated upstream wavelengthchannel. “0000 DDDD” may be used to indicate the ID of the calibrateddownstream wavelength channel and “0000 UUUU” may be used to indicatethe ID of the calibrated upstream wavelength channel, where DDDD andUUUU are binary values. For example, if “0000 DDDD” with a value of“0000 0000” indicates that the ID of the calibrated downstreamwavelength channel is 0; and “0000 UUUU” with a value of “0000 0000”indicates that the ID of the calibrated upstream wavelength channel is0. It should be understood that it is not unique to fill the“calibration record” in octets 19−n, and the “calibration record” mayalso be located in other octets of the message.

Optionally, octet 17 is a new optional octet, octet 17 is filled with an“ONU calibration type”, and “0000 00TT” may be used to denote a standardONU type. When TT=00, it indicates an ONU whose wavelengths are notcalibrated at delivery; and when TT=01, it indicates an ONU whosewavelengths are pre-calibrated at delivery.

Optionally, octet 18 may be a new optional field, and octet 18 is filledwith a “quantity of calibrated wavelength channels”. “AAAABBBB” may beused to denote the “quantity of calibrated wavelength channels”.Specifically, “AAAA” denotes the quantity of calibrated upstreamwavelength channels and “BBBB” denotes the quantity of calibrateddownstream wavelength channels, where AAAA and BBBB are binary values.For example, “AAAA” with a value of “0001” indicates that the quantityof calibrated downstream wavelength channels is 1; and “BBBB” with avalue of “0001” indicates that the quantity of calibrated upstreamwavelength channels is 1.

Information of other fields of the message is described below: Octets1-2 in the PLOAM message are filled with an ONU ID field, where theONU-ID with a value of 0x03FF indicates that no ONU-ID has beenallocated to the ONU by now; octet 3 is filled with a “message type ID”,and “0x01” may be used to denote an ONU sequence number if the messagetype is an ONU sequence number; octet 4 is filled with a “sequencenumber”, and denotes a broadcast message sequence number or a unicastmessage sequence number, which may be denoted by “0x00”; octets 5-16 maybe filled with a “vendor ID”, a “vendor specific serial number (VSSN)”,a “random delay”, or other information, where a specific style of thefilling is not limited; octets n−40 (19<n<40, and n is an integer) arefilled with “transmit end data” or “receive end data” or other content;and octets 41-48 are used for message integrity check MIC.

It should be understood that, in the foregoing message format, fieldvalues, field lengths, and positions of the fields in the message, maybe determined according to actual needs and are not limited todescription of the specific fields in the foregoing table.

From the description of the foregoing Table 1, it can be learned thatthe second message reported by the unregistered ONU carries at least anSN and a calibration record, and may also carry an ONU calibration typeor a quantity of calibrated wavelength channels.

S306. The OLT receives the second message of the unregistered ONU, andaccording to the calibration record in the second message, determineswhether the ONU meets a registration condition.

Specifically, the OLT acquires calibrated upstream and downstreamwavelength channels of the ONU from the calibration record, andaccording to the acquired calibrated upstream and downstream wavelengthchannels of the ONU, determines whether the ONU meets the registrationcondition.

The ONU registration condition is: The ONU has calibrated a pair ofbound upstream and downstream wavelength channels, and the pair of boundupstream and downstream wavelength channels is OLT-expected upstream anddownstream operating wavelength channels, and the pair of bound upstreamand downstream wavelength channels, which has been calibrated by theONU, is in the calibration record, where the OLT-expected upstream anddownstream operating wavelength channels are upstream and downstreamoperating wavelength channels allocated by the OLT to the ONU. That is,according to the calibration record, the OLT determines that anOLT-expected wavelength channel ID is in the calibration record, andthen allows the ONU to register.

S308. When the ONU meets the registration condition, the OLT allows theONU to register.

In this embodiment of the present invention, according to an SN and acalibration record reported by an unregistered ONU at registration, anOLT performs registration authentication for the unregistered ONU,thereby ensuring that the ONU can work normally on an expected operatingwavelength channel after the registration, which implements quickauthentication of the ONU by the OLT and improves system reliability.

Embodiment 3

As shown in FIG. 4, FIG. 4 is a schematic flowchart of a wavelengthchannel switching method according to an embodiment of the presentinvention.

It should be understood that the method process shown in FIG. 4 may befurther actions after Embodiment 2 or may be a method processindependent of Embodiment 2.

The method process shown in FIG. 4 may also, based on the architecturein FIG. 1, specifically deal with addition of a new wavelength channelin a passive optical network system, where the new wavelength channelmay be a non-calibrated wavelength channel. It should be understood thatwavelength channels involved in the two scenarios described below may beboth understood as new wavelength channels added in the passive opticalnetwork system. First, in view of energy efficiency of an OLT in anexisting system, when there are few users or a small traffic volume in alive network, an ONU is switched to some wavelength channels or even asingle wavelength channel, and other remaining wavelength channels aredisabled to achieve a purpose of energy saving. As regards operatingwavelength channels that are currently used by the ONU, the operatingwavelength channels are wavelength channels already calibrated by theONU. However, subsequently, due to an increase of a service scale, thewavelength channels that are previously disabled for energy saving needto be enabled again. The re-enabled wavelength channels, which arepreviously disabled for energy saving, may be understood as the newwavelength channels mentioned above. Second, when the passive opticalnetwork system is upgraded and expanded from previously 4 wavelengthchannels to 8 wavelength channels, 4 newly added wavelength channels arethe new wavelength channels mentioned above, where the 4 wavelengthchannels are given merely as an example without limitation to 4wavelength channels.

With reference to the application scenario mentioned above, thewavelength switching method of an ONU is described below.

S400. An ONU reports a calibration record to an OLT.

Specifically, the calibration record includes a first entry and/or asecond entry, where the first entry includes an ID of a calibrateddownstream wavelength channel and the second entry includes an ID of acalibrated upstream wavelength channel.

S402. The OLT receives the calibration record sent by the ONU.

As regards a specific process of generating the calibration record bythe ONU, reference may be made to the “specific process of generatingthe first entry in the calibration record” and the “specific process ofgenerating the second entry in the calibration record” in step S302 andstep S304 in Embodiment 1, and no repeated description is given herein.

Specifically, the ONU may, in the ONU registration process in Embodiment1, report the calibration record to the OLT by adding the calibrationrecord into the second message in Embodiment 1, which is a mostpreferred embodiment. Certainly, the ONU may also send a message thatcarries the calibration record to the OLT, and no limitation is imposedherein.

S404. When a target wavelength channel to which the ONU needs to switchis not in the calibration record, the OLT sends a third message to theONU, where the third message carries a forced wavelength switching flag,which is used to instruct the ONU to calibrate the target wavelengthchannel to switch to and switch to the calibrated target wavelengthchannel by force.

Optionally, the third message may further include a forced calibrationflag, used for the OLT to decide, before the ONU performs wavelengthswitching and according to the forced calibration flag, whether tocalibrate a new wavelength channel. Specifically, if a value of theforced calibration flag is 1, the ONU switches to the target wavelengthchannel after completing calibration of all new wavelength channels; andif a value of the forced calibration flag is 0, the ONU switches to thetarget wavelength channel directly.

Further, it may be understood that, whether a target wavelength channelneeds to be calibrated is decided by the value of the forced wavelengthswitching flag, and whether a new wavelength channel needs to becalibrated is decided by the value of the forced calibration flag.

Specifically, the OLT may extract the calibration record from themessage that is reported by the ONU and includes the calibration record.Preferably, at registration, the ONU may report the calibration recordto the OLT by adding the calibration record into a message that carriesan SN. For this manner, reference may be made to related methoddescription of Embodiment 1.

Specifically, a format of the third message is described in Table 3.

TABLE 3 Octet Content Description 1-2 0x03FF ONU ID 3 0x21 Adjustmentcontrol message 4 Sequence number Broadcast or unicast PLOAM messagesequence number 5 Operation code 0—request operation (Operation Code) 7-8 Upstream start Start time for upstream wavelength count adjustmentof the ONU  9-10 Downstream start Start time for downstream wavelengthcount adjustment of the ONU 11 C00F 000R C: forced calibration flag(optional) C = 1, the ONU switches to the target wavelength channelafter completing calibration of all new wavelength channels C = 0, theONU switches to the target wavelength channel directly F: forcedwavelength switching flag F = 1, if the ONU does not support the targtwavelength channel, forced switching must be performed throughself-calibration F = 0, if the ONU does not support the targetwavelength chanel, a corresponding error code is returned directlywithout forced switching R: R = 1, when the wavelength switching fails,the ONU is forced to roll back to a wavelength channel that works beforethe switching R = 0, when the wavelength switching fails, the ONU is notforced to roll back to a wavelength channel that works before theswitching . . . . . . . . . 41-48 Message integrity Message integritycheck check MIC

Table 3 is described by using a format of a PLOAM message as an example,but is not limited to the PLOAM message.

In Table 3, octet 11 is a new field, and octet 11 is filled with aforced wavelength switching flag, which is used to instruct the ONU tocalibrate a non-calibrated target wavelength channel and switch to thecalibrated target wavelength channel by force.

Specifically, C00F 000R may be used to indicate a forced wavelengthswitching flag, which is detailed below:

The C value is used to indicate a forced calibration flag. That is, whenthe C value is 1, it indicates that the ONU switches to the calibratedtarget wavelength channel after the ONU completes calibration of all newwavelength channels; and when the C value is 0, it indicates that theONU switches to the calibrated target wavelength channel directly.

The F value is a forced wavelength switching flag and is used toinstruct the ONU to calibrate a non-calibrated target wavelength channeland instruct the ONU to switch to the calibrated target wavelengthchannel. When the F value is 1, no matter whether the ONU supports thetarget wavelength channel, forced switching needs to be performedthrough self-calibration; and when the F value is 0, for a targetwavelength channel that is not supported by the ONU, a correspondingerror code is returned directly without forced switching.

The R value is used to indicate, after wavelength switching fails,whether to perform forced rollback to the wavelength channel that worksbefore the wavelength switching. That is, when the R value is 1, itindicates that when the wavelength switching fails, the ONU is forced toroll back to the wavelength channel that works before the switching; andwhen the R value is 0, it indicates that when the wavelength switchingfails, the ONU is not forced to roll back to the wavelength channel thatworks before the switching.

Further, other fields of the PLOAM message are fields defined in theexisting standard, and are described herein roughly rather than indetail. Octets 1-2 are filled with an ONU ID, and used to denote an ONUID that is delivered to a specified ONU in a unicast manner; octet 3 isfilled with a message type ID, where, for this message type ID, 0x21 maybe used to indicate that the message is an adjustment control message,and may also be understood as a wavelength switching message; octet 4 isa sequence number, and is specifically a unicast PLOAM message sequencenumber or a broadcast PLOAM message sequence number; octet 5 is anoperation code, and a value 0 indicates that the operation is a requestoperation; octets 7-8 are an upstream start count, whose value is usedto denote start time for upstream wavelength adjustment of the ONU;octets 9-10 are a downstream start count, whose value is used to denotestart time for downstream wavelength adjustment of the ONU; and octets41-48 are used for message integrity check MIC.

It should be understood that, in the foregoing message format, fieldvalues, field lengths, and positions of the fields in the message may bedetermined according to actual needs and are not limited to descriptionof the specific fields in the foregoing table.

It should be understood that, optionally, steps S300 and S302 may alsobe skipped for the OLT. That is, the OLT has no ONU calibration recordreported by the ONU. In this case, the OLT sends a third message to theONU, where the third message carries a forced wavelength switching flag,which is used to instruct the ONU to calibrate a non-calibrated targetwavelength channel and switch to the calibrated target wavelengthchannel by force.

Further, when the target wavelength channel to which the ONU needs toswitch is in the calibration record, the OLT sends a third message tothe ONU, which is used to instruct the ONU to switch to the targetwavelength channel. In this case, the third message sent by the OLT tothe ONU does not carry a forced wavelength switching flag.

Specifically, when the ONU has multiple target wavelength channels, awavelength channel in the calibration record may be selectedpreemptively as the target wavelength channel to switch to for theswitching.

S406. The ONU receives the third message; according to the forcedwavelength switching flag in the third message, the ONU calibrates thenon-calibrated target wavelength channel and switches to the calibratedtarget wavelength channel by force.

Specifically, the ONU determines a value of the forced wavelengthswitching flag in the received third message. If the value is 1 and ifthe ONU does not support the target wavelength channel, forced switchingis performed through self-calibration; or, if the value is 0 and if theONU does not support the target wavelength channel, a correspondingerror code is returned directly without forced switching.

Further, before the wavelength switching process, the ONU decides,according to a forced calibration flag, whether to calibrate a newwavelength channel. Optionally, the third message may further includethe forced calibration flag, where the flag is used to decide, beforethe wavelength switching process, whether to calibrate the newwavelength channel. Specifically, if a value of the forced calibrationflag is 1, the ONU switches to the target wavelength channel aftercompleting calibration of all new wavelength channels; and if a value ofthe forced calibration flag is 0, the ONU switches to the targetwavelength channel directly.

Further, it should be understood that, whether a target wavelengthchannel needs to be calibrated is decided by the value of the forcedwavelength switching flag, and whether a new wavelength needs to becalibrated is decided by the value of the forced calibration flag.

In this embodiment of the present invention, according to a calibrationrecord reported by an ONU, an OLT determines that a target wavelengthchannel to switch to is not in the calibration record, and thereforeuses a forced wavelength switching flag to instruct the ONU to calibratea non-calibrated target wavelength channel and switch to the calibratedtarget wavelength channel by force, thereby ensuring that the ONU canswitch to a new wavelength channel. When the ONU has multiple optionaltarget wavelength channels, a target wavelength channel recorded in thecalibration record is calibrated preemptively, so that wavelengthswitching is performed quickly.

Embodiment 4

The following describes a wavelength channel calibration methodaccording to a calibration record. Specifically, as shown in FIG. 5,FIG. 5 shows a method for wavelength channel calibration of an ONU,which is detailed below:

S500. An OLT receives a calibration record reported by an ONU, and whenan OLT-expected wavelength channel is not in the reported calibrationrecord, that is, if the OLT-expected wavelength channel is a newwavelength channel, sends a fourth message to the ONU to request the ONUto perform wavelength channel calibration for the expected wavelengthchannel.

Specifically, the OLT receives the calibration record, and according tothe calibration record, queries whether the ONU-expected wavelengthchannel is in the calibration record. When the ONU-expected wavelengthchannel is not in the reported calibration record, the OLT instructs theONU to perform wavelength channel calibration for the expectedwavelength channel; or, when the ONU-expected wavelength channel is inthe reported calibration record, the expected wavelength channel doesnot need to be calibrated any more. The calibration record includes afirst entry and/or a second entry, where the first entry includes an IDof a calibrated downstream wavelength channel and the second entryincludes an ID of a calibrated upstream wavelength channel.

Further, the fourth message may be obtained by extending any one of: aPLOAM message, an OMCI message, an MPCP message or an OAM message.

Optionally, the fourth message carries an expected wavelength channelindication bit, where the expected wavelength channel indication bit isused to instruct the ONU to perform wavelength channel calibration forthe expected wavelength channel and then use the currently calibratedwavelength channel as a new operating wavelength channel or switch back,after completion of wavelength calibration, to an original wavelengthchannel.

A format of the fourth message is described in Table 4.

TABLE 4 Octet Content Description 1-2 0x03FF ONU ID 3 Message typeCalibration request (calibration request) ID 4 Sequence Broadcast orUnicast PLOAM sequence number (SN) number. 5 0000000R R = 0: Aftercompletion of wavelength channel (optional) calibration, the currentlycalibrated wavelength channel is a new operating wavelength channel R =1: After completion of wavelength channel calibration, switch back to anoriginal wavelength channel  6-48 . . . . . .

As shown in Table 4, a PLOAM message is used as an example of the fourthmessage for description.

New octets are octet 3 and octet 5. Octet 3 indicates that the messagetype ID is a calibration request.

Octet 5 is an optional field and is used to indicate to the ONU, aftercompletion of wavelength calibration, whether the expected operatingwavelength channel of the ONU works on the original wavelength channel,which may be indicated by 0000 000R. Specifically, R=0 indicates that,after completion of wavelength calibration, the current calibratedwavelength channel is a new operating wavelength channel; and R=1indicates that, after completion of wavelength calibration, it isnecessary to switch back to the original wavelength channel.

For octets 6-48, refer to the specific description of Table 3, and norepeated description is given herein.

The format of the fourth message may also be shown in the followingTable 5. By using octets 5-6 in Table 5, the ONU is instructed tocalibrate the expected wavelength channel, and the detailed format is asfollows:

TABLE 5 Octet Content Description 1-2 0x03FF ONU ID 3 Message typeCalibration request ID 4 Sequence Broadcast or unicast PLOAM messagenumber sequence number 5 option 0: Calibrate all new wavelength channels1: Calibrate a wavelength channel specified by the subsequent field 6DDDD UUUU DDDD: ID of a downstream wavelength channel that needs to becalibrated UUUU: ID of an upstream wavelength channel that needs to becalibrated 7 0000 000R R = 0: After completion of wavelength (optional)channel calibration, the current calibrated wavelength channel is a newoperating wavelength channel R = 1: After completion of wavelengthchannel calibration, switch back to the original wavelength channel . .. . . . . . .

As shown in Table 5, the new octets 5-6 are used to denote wavelengthchannels that need to be calibrated by the ONU. Specifically, octet 5 isan option field. A “0” value of the option instructs the ONU tocalibrate all new wavelength channels; and a “1” value of the optioninstructs the ONU to calibrate a wavelength channel specified in octet6. Octet 6 is used to indicate which wavelength channels need to becalibrated in octet 5. Specifically, “DDDD” is an ID of a downstreamwavelength channel that needs to be calibrated, and “UUUU” is an ID ofan upstream wavelength channel that needs to be calibrated.

Octet 7 in Table 5 is a new optional field and is used to indicate tothe ONU, after completion of wavelength channel calibration, whether theONU works on the new operating wavelength channel or works on theoriginal wavelength channel, which may be indicated by 0000 000R.Specifically, R=0 indicates that, after completion of wavelength channelcalibration, the current calibrated wavelength channel is a newoperating wavelength channel; and R=1 indicates that, after completionof wavelength channel calibration, it is necessary to switch back to theoriginal wavelength channel.

For other octets, reference may be made to the description ofcorresponding octets in Table 1-4.

Another type of fourth message may be shown in the following Table 6.Table 6 differs from Table 5 in that a quantity of wavelength channelsthat need to be calibrated is added, so that wavelength channelcalibration may be performed for multiple wavelength channels, asdetailed below in Table 6.

TABLE 6 Octet Content Description 1-2 0x03FF ONU ID 3 Message type IDCalibration request 4 Sequence number Broadcast or unicast PLOAM messagesequence number 5 option 0: Calibrate all new wavelength channels 1:Calibrate wavelength channels specified by the subsequent octets 6-7 6AAAA BBBB AAAA: quantity of downstream wavelength channels that need tobe calibrated BBBB: quantity of upstream wavelength channels that needto be calibrated 7 0000 DDDD ID of a downstream wavelength channel thatneeds to be calibrated . . . 0000 UUUU ID of an upstream wavelengthchannel that needs to be calibrated . . . . . . . . .

In Table 6, the new octet 6 denotes the quantity of wavelength channelsthat need to be calibrated, where the quantity of wavelength channelsthat need to be calibrated may indicate multiple wavelength channelsthat need to be calibrated, which is a difference from Table 5, and inTable 5, the quantity of wavelength channels that need to be calibratedmay be one. Specifically, this is denoted by “AAAA BBBB”, where “AAAA”denotes the quantity of downstream wavelength channels that need to becalibrated, and “BBBB” denotes the quantity of upstream wavelengthchannels that need to be calibrated. In octets 7−n, “0000 DDDD” denotesan ID of a downstream wavelength channel that needs to be calibrated,and is used to identify a downstream wavelength channel that needs to becalibrated, and “0000 UUUU” denotes an ID of an upstream wavelengthchannel that needs to be calibrated, and is used to identify an upstreamwavelength channel that needs to be calibrated.

For other octets, reference may be made to the description ofcorresponding octets in Table 5, where a value “1” of the option inoctet 5 indicates calibration of wavelength channels specified by thesubsequent octets 6-7. The octets are not described one by one in detailherein again.

S502. The ONU receives the fourth message of the OLT and performswavelength channel calibration for the expected wavelength channel.

As regards a specific process of performing wavelength channelcalibration by the ONU, reference may be made to the process ofgenerating a calibration record by the ONU, that is, the “specificprocess of generating the first entry in the calibration record” and the“specific process of generating the second entry in the calibrationrecord” in step S202 and step S204 in Embodiment 1, and no repeateddescription is given herein.

Specifically, in the ONU registration process in Embodiment 1, the ONUmay report the calibration record to the OLT by adding the calibrationrecord into the second message in Embodiment 1, which is a mostpreferred embodiment. Certainly, the ONU may also send a message thatcarries the calibration record to the OLT, and no limitation is imposedherein.

Optionally, according to the expected wavelength channel indication bitcarried in the fourth message, the ONU performs wavelength channelcalibration for the expected wavelength channel and then uses thecurrently calibrated wavelength channel as a new operating wavelengthchannel or switches back, after completion of wavelength calibration, tothe original wavelength channel.

As shown in FIG. 6, FIG. 6 shows another method for wavelength channelcalibration of an ONU, which is detailed below:

S600. An OLT receives a calibration record reported by an ONU, and whenan ONU-expected wavelength channel is not in the reported calibrationrecord, that is, if the ONU-expected wavelength channel is a newwavelength channel, the OLT sends a fifth message to the ONU, where thefifth message carries an ONU deactivation indication bit and is used toinstruct the ONU to get deactivated and then calibrate all newwavelength channels before re-registration.

Specifically, the OLT receives the calibration record, and according tothe calibration record, queries whether the ONU-expected wavelengthchannel is in the calibration record. When the ONU-expected wavelengthchannel is not in the reported calibration record, the OLT instructs theONU to get deactivated and then calibrate all new wavelength channelsbefore re-registration. When the ONU-expected wavelength channel is inthe reported calibration record, the expected wavelength channel doesnot need to be calibrated any more. The calibration record includes afirst entry and/or a second entry, where the first entry includes an IDof a calibrated downstream wavelength channel and the second entryincludes an ID of a calibrated upstream wavelength channel.

Further, the fifth message may be obtained by extending any one of: aPLOAM message, an OMCI message, an MPCP message or an OAM message.

Optionally, the fifth message carries an expected wavelength channelindication bit, where the expected wavelength channel indication bit isused to instruct the ONU to perform wavelength channel calibration forthe expected wavelength channel and then use a current calibratedwavelength channel as a new operating wavelength channel or switch back,after completion of wavelength calibration, to the original wavelengthchannel (the indication bit is not displayed in Table 7, and referencemay be made to the description of Table 6).

The format of the fifth message may be shown in Table 7. A deactivationindication bit in octet 5 in Table 7 instructs the ONU to getdeactivated and then calibrate all new wavelength channels beforere-registration. It should be understood that a position, a length andthe like of the deactivation indication in Table 7 are not limited tothose in Table 7, and the position and the like may be changed accordingto various needs.

TABLE 7 Octet Content Description 1-2 0x03FF ONU ID 3 0x05Deactivate_ONU-ID (Deactivate_ONU-ID) 4 Sequence Unicast or broadcastPLOAM message sequence number number 5 0000 000F F = 0: No operationrequirement F = 1: After being deactivated, the ONU calibrates all newwavelength channels before re-registration

As shown in Table 7, the new octet 5 is used to instruct the ONU whetherto calibrate all new wavelength channels, which may be denoted by “0000000F”. F=0 indicates that no operation requirement is imposed on theONU, that is, the ONU does not need to perform calibration for thewavelength channel; and F=1 indicates that, after being deactivated, theONU calibrates all new wavelength channels before re-registration

Other octets are content defined by a standard PLOAM message, whereoctet 3 is a message type ID, and the message type ID is a DeactivateONU ID (Deactivate ONU ID) message and may be denoted by 0x05.

For other octets, reference may be made to the description ofcorresponding octets in Table 3 or Table 4.

S602. The ONU receives the fifth message of the OLT, and according tothe deactivation indication bit in the fifth message, performsdeactivation processing and then calibrates all new wavelength channelsbefore re-registration.

As regards a specific process of performing wavelength channelcalibration by the ONU, reference may be made to the process ofgenerating a calibration record by the ONU, that is, the “specificprocess of generating the first entry in the calibration record” and the“specific process of generating the second entry in the calibrationrecord” in step S302 and step S304 in Embodiment 1, and no repeateddescription is given herein.

Specifically, in the ONU registration process in Embodiment 2, the ONUmay report the calibration record to the OLT by adding the calibrationrecord into the second message in Embodiment 2, which is a mostpreferred embodiment. Certainly, the ONU may also send a message thatcarries the calibration record to the OLT, and no limitation is imposedherein.

In the wavelength channel calibration method provided in this embodimentof the present invention, according to a calibration record reported byan ONU, an OLT instructs, by using different message indications, theONU to calibrate a new wavelength channel, thereby implementing smoothexpansion of a system and improving a utilization rate of systembandwidth.

An apparatus provided in an embodiment of the present invention is shownin FIG. 7.

A passive optical network communications apparatus 70 is provided, wherethe apparatus includes:

a first communications unit 702, configured to: receive a calibrationrecord reported by an optical network unit ONU, where the calibrationrecord includes an ID of a calibrated wavelength channel; send a firstmessage to the ONU according to an instruction of a first processingunit, where the first message includes a forced wavelength switchingflag, where the forced wavelength switching flag is used to instruct theONU to perform wavelength channel calibration for a target wavelengthchannel to switch to and instruct the ONU to switch to the calibratedtarget wavelength channel; and receive data sent by the ONU over thecalibrated target wavelength channel; and

the first processing unit 704, configured to: when the OLT determines,according to the calibration record, that a target wavelength channel IDcorresponding to the target wavelength channel to which the ONU needs toswitch is not in the calibration record, instruct the firstcommunications unit to send the first message to the ONU.

The communications apparatus may be an OLT, and corresponds to the OLTin FIG. 1.

For specific functions of the OLT, refer to the specific description inthe method embodiments in FIG. 1 to FIG. 6, and no repeated descriptionis given herein.

The first communications unit may be a transceiver of the OLT. The firstprocessing unit may be a MAC or a microprocessor, and the firstprocessing unit may be implemented on a chip.

The first message further includes a forced calibration flag that isused to instruct the ONU to switch to the target wavelength channelafter calibrating all new wavelength channels, where new wavelengthchannel IDs corresponding to the new wavelength channels are not in thecalibration record, and the new wavelength channels include the targetwavelength channel.

Further, the first communications unit is specifically configured to:send a second message to the ONU, where the second message includes aquiet window and is used to instruct the ONU to register within thequiet window; and receive, within the quiet window, a registrationrequest reported by the ONU, where the registration request includes asequence number of the ONU and the calibration record.

Further, the calibration record includes at least one of an ID of acalibrated upstream wavelength channel and an ID of a calibrateddownstream wavelength channel.

Further, the calibration record includes at least one of an ID of acalibrated upstream wavelength channel and an ID of a calibrateddownstream wavelength channel.

Further, the first processing unit is further configured to determine,according to the calibration record, that an OLT-expected wavelengthchannel ID is in the calibration record, and then allows the ONU toregister, where the OLT-expected wavelength channel ID is an operatingwavelength channel ID allocated by the OLT to the ONU.

Further, the first processing unit is further configured to: when anOLT-expected wavelength channel ID is not in the calibration record,instruct the first communications unit to send a third message to theONU; and

the first communications unit is further configured to: according to aninstruction of the first processing unit, send a third message to theONU, so as to request the ONU to perform wavelength channel calibrationfor a wavelength channel identified by the OLT-expected wavelengthchannel ID, where the OLT-expected wavelength channel ID is an operatingwavelength channel ID allocated by the OLT to the ONU.

Further, the third message further includes an expected wavelengthchannel indication bit and is used to instruct the ONU to performwavelength channel calibration for the OLT-expected wavelength channeland use the calibrated OLT-expected wavelength channel as an operatingwavelength channel of the ONU.

Further, the first processing unit is further configured to: when anOLT-expected wavelength channel ID is not in the calibration record,instruct the first communications unit to send a fourth message to theONU; and

the first communications unit is further configured to send a fourthmessage to the ONU according to an instruction of the first processingunit, where the fourth message includes a wavelength channel calibrationindication bit and is used to instruct the ONU to calibrate all newwavelength channels or instruct the ONU to calibrate a specified newwavelength channel, where the all new wavelength channels include anOLT-expected wavelength channel identified by the OLT-expectedwavelength channel ID and the specified new wavelength channel, and thespecified new wavelength channel is determined according to an ID of ato-be-calibrated wavelength channel in the fourth message or determinedaccording to a quantity of to-be-calibrated wavelength channels and IDsof the to-be-calibrated wavelength channels in the fourth message.

Further, the first processing unit is further configured to: when anOLT-expected wavelength channel ID is not in the calibration record,instruct the first communications unit to send a fifth message to theONU; and

the first communications unit is further configured to send a fifthmessage to the ONU according to an instruction of the first processingunit, where the fifth message includes an ONU deactivation indicationbit and is used to instruct the ONU to get deactivated and thencalibrate all new wavelength channels before re-registration, where theall new wavelength channels include an OLT-expected wavelength channelidentified by the OLT-expected wavelength channel ID.

It can be seen that, in this embodiment of the present invention, anoptical network unit ONU reports a calibration record of the ONU, wherethe calibration record includes an ID of a calibrated wavelengthchannel; an OLT sends a first message to the ONU when determining,according to the calibration record, that a target wavelength channel IDcorresponding to a target wavelength channel to which the ONU needs toswitch is not in the calibration record, where the first messageincludes a forced wavelength switching flag; the ONU performs, accordingto the forced wavelength switching flag, wavelength channel calibrationfor the target wavelength channel to switch to, and instructs the ONU toswitch to the calibrated target wavelength channel. In this way, the ONUcan implement wavelength switching quickly after calibrating a newwavelength channel so as to perform data communication over thecalibrated new wavelength channel, thereby expanding a capacity of asystem by effectively using the new wavelength channel and improvingbandwidth utilization of the system.

As shown in FIG. 8, an embodiment of the present invention furtherprovides a passive optical network communications apparatus 80, whosespecific structure is described below:

The communications apparatus 80 includes:

a second communications unit 802, configured to: report a calibrationrecord to an optical line terminal OLT, where the calibration recordincludes an ID of a calibrated wavelength channel; and receive a firstmessage sent by the OLT, where the first message includes a forcedwavelength switching flag; and

a second processing unit 804, configured to: perform, according to theforced wavelength switching flag, wavelength channel calibration for atarget wavelength channel to switch to, and switch to the calibratedtarget wavelength channel; and perform, by the ONU, data communicationwith the OLT over the switched-to target wavelength channel.

The communications apparatus may be an ONU, and corresponds to the ONUin FIG. 1.

For specific functions of the ONU, refer to the specific description inthe method embodiments in FIG. 1 to FIG. 6, and no repeated descriptionis given herein.

The second communications unit may be a transceiver of the ONU. Thesecond processing unit may be a MAC or a microprocessor, and functionsof the second processing unit may be implemented on a chip of the ONU.

Further, the first message further includes a forced calibration flag,and

the second communications unit is further configured to calibrate allnew wavelength channels according to the forced calibration flag, andswitch to the target wavelength channel, where new wavelength channelIDs corresponding to the new wavelength channels are not in thecalibration record, and the new wavelength channels include the targetwavelength channel.

Further, the second communications unit is specifically configured to:receive a second message sent by the OLT, where the second messageincludes a quiet window; send, by the ONU within the quiet window, aregistration request to the OLT, where the registration request includesa sequence number of the ONU and the calibration record, and thecalibration record is generated by the ONU; and receive, within thequiet window, the sequence number of the ONU and the calibration recordthat are reported by the ONU.

Further, the calibration record includes at least one of an ID of acalibrated upstream wavelength channel and an ID of a calibrateddownstream wavelength channel.

Further, the calibration record further includes at least one of aquantity of calibrated downstream wavelength channels and a quantity ofcalibrated upstream wavelength channels.

Further, the second communications unit is further configured to receivea third message sent by the OLT; and

the second processing unit is further configured to perform, accordingto the third message, wavelength channel calibration for a wavelengthchannel identified by an OLT-expected operating wavelength channel ID,where the OLT-expected wavelength channel ID is an operating wavelengthchannel ID allocated by the OLT to the ONU.

Further, the third message further includes an expected wavelengthchannel indication bit; and

the second processing unit is further configured to: according to theexpected wavelength channel indication bit, perform wavelength channelcalibration for the OLT-expected wavelength channel and use thecalibrated OLT-expected wavelength channel as an operating wavelengthchannel of the ONU.

Further, the second communications unit is further configured to receivea fourth message sent by the OLT, where the fourth message includes awavelength channel calibration indication bit; and

the second processing unit is further configured to: calibrate all newwavelength channels according to the wavelength channel calibrationindication bit; or, calibrate a specified new wavelength channelaccording to the wavelength channel calibration indication bit, wherethe all new wavelength channels include an OLT-expected wavelengthchannel identified by an OLT-expected wavelength channel ID and thespecified new wavelength channel, and the specified new wavelengthchannel is a wavelength channel specified according to an ID of ato-be-calibrated wavelength channel in the fourth message or is awavelength channel specified according to a quantity of to-be-calibratedwavelength channels and IDs of the to-be-calibrated wavelength channelsin the fourth message.

Further, the second communications unit is further configured to receivea fifth message sent by the OLT, where the fifth message includes an ONUdeactivation indication bit; and the second processing unit is furtherconfigured to calibrate all new wavelength channels according to the ONUdeactivation indication bit before re-registration, where the newwavelength channels include an OLT-expected wavelength channelidentified by an OLT-expected wavelength channel ID, where theOLT-expected wavelength channel ID is an operating wavelength channel IDallocated by the OLT to the ONU.

It can be seen that, in this embodiment of the present invention, anoptical network unit ONU reports a calibration record of the ONU, wherethe calibration record includes an ID of a calibrated wavelengthchannel; an OLT sends a first message to the ONU when determining,according to the calibration record, that a target wavelength channel IDcorresponding to a target wavelength channel to which the ONU needs toswitch is not in the calibration record, where the first messageincludes a forced wavelength switching flag; the ONU performs, accordingto the forced wavelength switching flag, wavelength channel calibrationfor the target wavelength channel to switch to, and instructs the ONU toswitch to the calibrated target wavelength channel. In this way, the ONUcan implement wavelength switching quickly after calibrating a newwavelength channel so as to perform data communication over thecalibrated new wavelength channel, thereby expanding a capacity of asystem by effectively using the new wavelength channel and improvingbandwidth utilization of the system.

An embodiment of the present invention further provides a communicationsapparatus 90, as shown in FIG. 90.

The communications apparatus 90 includes: a processor 902, a memory 904,and a bus system 906, where the processor 902 is connected to the memory904 via the bus system 904, the memory 904 is used to storeinstructions, and the processor 904 is used to execute the instructionsstored by the memory 904. The processor 902 is configured to: whendetermining, according to a calibration record, that a target wavelengthchannel ID corresponding to a target wavelength channel to which an ONUneeds to switch is not in the calibration record, send a first messageto the ONU.

Alternatively, the processor 902 is configured to perform, according toa forced wavelength switching flag, wavelength channel calibration for atarget wavelength channel to switch to, and switch to the calibratedtarget wavelength channel; and perform, by an ONU, data communicationwith the OLT over the switched-to target wavelength channel.

Further, for specific functions of the processor 902, reference may bemade to the specific functions of the second processing unit 704 in thecommunications apparatus 70 in FIG. 7 or the second processing unit 804in the communications apparatus 80 in FIG. 8 in the apparatusembodiments, and no repeated description is given herein.

It should be understood that, in this embodiment of the presentinvention, the processor 902 may be a central processing unit (CPU), andthe processor 902 may also be another general purpose processor, adigital signal processor (DSP), an application-specific integratedcircuit (ASIC), a field programmable gate array (FPGA) or otherprogrammable logical device, a discrete gate or transistor logicaldevice, a discrete hardware assembly, or the like. The general purposeprocessor may be a microprocessor, or the processor may also be anyconventional processor or the like.

The memory 904 may include a read-only memory and a random accessmemory, and provide instructions and data for the processor 902. A partof the memory 904 may further include a non-volatile random accessmemory. For example, the memory 904 may further store device typeinformation.

The bus system 906 may include not only a data bus but also a powersupply bus, a control bus, a status signal bus and the like. However,for clear description, various buses are denoted by the bus system 906in the diagram.

In an implementation process, steps of the foregoing methods may beimplemented by using an integrated logical circuit in a hardware form orinstructions in a software form in the processor 902. The steps of themethods disclosed with reference to the embodiments of the presentinvention may be directly implemented by a hardware processor, or may beimplemented by a combination of hardware and a software module in aprocessor. The software module may be located in a storage medium thatis mature in the art, such as a random access memory, a flash memory, aread-only memory, a programmable read-only memory, or an electricallyerasable programmable memory, or a register. The storage medium islocated in the memory 904, and the processor 904 reads information inthe memory 904 and implements, in combination with its hardware, thesteps of the foregoing methods. To avoid repetition, no detaileddescription is given herein again.

The present invention further provides a passive optical network system.Referring to FIG. 1, the passive optical network system at leastincludes an OLT and ONUs. The OLT is connected to the ONUs via anoptical splitter. For functions implemented by the OLT, refer to FIG. 7of the apparatus embodiments and the corresponding description of FIG.7; and for functions implemented by the ONU, refer to FIG. 8 of theapparatus embodiments and the corresponding description of FIG. 8.Specifically:

The OLT is configured to: receive a calibration record reported by anoptical network unit ONU, where the calibration record includes an ID ofa calibrated wavelength channel; send a first message to the ONU whenthe OLT determines, according to the calibration record, that a targetwavelength channel ID corresponding to a target wavelength channel towhich the ONU needs to switch is not in the calibration record, wherethe first message includes a forced wavelength switching flag, where theforced wavelength switching flag is used to instruct the ONU to performwavelength channel calibration for the target wavelength channel toswitch to and instruct the ONU to switch to the calibrated targetwavelength channel; and receive data sent by the ONU over the calibratedtarget wavelength channel.

The ONU is configured to: report the calibration record to the opticalline terminal OLT, where the calibration record includes the ID of thecalibrated wavelength channel; receive the first message sent by theOLT, where the first message includes the forced wavelength switchingflag; according to the forced wavelength switching flag, performwavelength channel calibration for the target wavelength channel toswitch to, and switch to the calibrated target wavelength channel; andperform data communication with the OLT over the switched-to targetwavelength channel.

For specific formats of various messages mentioned above, refer to thespecific description of the corresponding embodiments in Embodiment 1 toEmbodiment 4 of the method, and no repeated description is given herein.

In the passive optical network system provided in this embodiment of thepresent invention, an optical network unit receives a first message sentby an optical line terminal, where the first message carries backupwavelength channel ID information; when the optical network unit detectsa fault, the optical network unit switches an operating wavelengthchannel of the optical network unit to a backup wavelength channelidentified by the backup wavelength channel ID information; and theoptical network unit performs data communication over the switched-tobackup wavelength channel, thereby implementing fast protectionswitching of the passive optical network system and improvingreliability of the system.

The present invention further provides a passive optical network system.Referring to FIG. 1, the passive optical network system at leastincludes an OLT and ONUs. The OLT is connected to the ONUs via anoptical splitter. For functions implemented by the OLT, refer to FIG. 7and the corresponding description of FIG. 7; and for functionsimplemented by the ONU, refer to FIG. 8 of the apparatus embodiments andthe corresponding description of FIG. 8. Specifically:

The OLT is configured to: receive a calibration record reported by anoptical network unit ONU, where the calibration record includes an ID ofa calibrated wavelength channel; send a first message to the ONU whenthe OLT determines, according to the calibration record, that a targetwavelength channel ID corresponding to a target wavelength channel towhich the ONU needs to switch is not in the calibration record, wherethe first message includes a forced wavelength switching flag, where theforced wavelength switching flag is used to instruct the ONU to performwavelength channel calibration for the target wavelength channel toswitch to and instruct the ONU to switch to the calibrated targetwavelength channel; and receive data sent by the ONU over the calibratedtarget wavelength channel.

The ONU is configured to: report the calibration record to the opticalline terminal OLT, where the calibration record includes the ID of thecalibrated wavelength channel; receive the first message sent by theOLT, where the first message includes the forced wavelength switchingflag; according to the forced wavelength switching flag, performwavelength channel calibration for the target wavelength channel to beswitched to, and switch to the calibrated target wavelength channel; and

perform, by the ONU, data communication with the OLT over theswitched-to target wavelength channel.

In this embodiment of the present invention, an ONU reports acalibration record of the ONU, where the calibration record includes anID of a calibrated wavelength channel; an OLT sends a first message tothe ONU when determining, according to the calibration record, that atarget wavelength channel ID corresponding to a target wavelengthchannel to which the ONU needs to switch is not in the calibrationrecord, where the first message includes a forced wavelength switchingflag; the ONU performs, according to the forced wavelength switchingflag, wavelength channel calibration for the target wavelength channelto switch to, and instructs the ONU to switch to the calibrated targetwavelength channel. In this way, the ONU can implement wavelengthswitching quickly after calibrating a new wavelength channel so as toperform data communication over the calibrated new wavelength channel,thereby expanding a capacity of a system by effectively using the newwavelength channel and improving bandwidth utilization of the system.

In the foregoing embodiments, the description of each embodiment hasrespective focuses. For a part that is not described in detail in anembodiment, reference may be made to related descriptions in otherembodiments.

It should be noted that, for ease of description, the foregoing methodembodiments are described as a series of action combinations. However, aperson skilled in the art should understand that the present inventionis not limited to the described sequence of the actions, because somesteps may be performed in another sequence or performed at the same timeaccording to the present invention. In addition, a person skilled in theart should also understand that all the embodiments described in thisspecification belong to exemplary embodiments, and the involved actionsand modules are not necessarily mandatory to the present invention.

In the several embodiments provided in the present application, itshould be understood that the disclosed apparatus may be implemented inother manners. For example, the described apparatus embodiment is merelyexemplary. For example, the unit division is merely logical functiondivision and may be other division in actual implementation. Forexample, a plurality of units or components may be combined orintegrated into another system, or some features may be ignored or notperformed. In addition, the displayed or discussed mutual couplings ordirect couplings or communication connections may be implemented throughsome interfaces. The indirect couplings or communication connectionsbetween the apparatuses or units may be implemented in electronic orother forms.

The units described as separate parts may or may not be physicallyseparate, and parts displayed as units may or may not be physical units,may be located in one position, or may be distributed on a plurality ofnetwork units. Some or all of the units may be selected according toactual needs to achieve the objectives of the solutions of theembodiments.

In addition, functional units in the embodiments of the presentinvention may be integrated into one processing unit, or each of theunits may exist alone physically, or two or more units are integratedinto one unit. The integrated unit may be implemented in a form ofhardware, or may be implemented in a form of a software functional unit.

When the foregoing integrated unit is implemented in the form of asoftware functional unit and sold or used as an independent product, theintegrated unit may be stored in a computer-readable storage medium.Based on such an understanding, the technical solutions of the presentinvention essentially, or the part contributing to the prior art, or allor a part of the technical solutions may be implemented in the form of asoftware product. The software product is stored in a storage medium andincludes several instructions for instructing a computer device (whichmay be a personal computer, a server, or a network device, and mayspecifically be a processor in a computer device) to perform all or apart of the steps of the foregoing methods described in the embodimentsof the present invention. The foregoing storage medium may include: anymedium that can store program code, such as a USB flash drive, aremovable hard disk, a magnetic disk, an optical disc, a read-onlymemory (ROM), or a random access memory (RAM).

The foregoing embodiments are merely intended for describing thetechnical solutions of the present invention, but not for limiting thepresent invention. Although the present invention is described in detailwith reference to the foregoing embodiments, persons of ordinary skillin the art should understand that they may still make modifications tothe technical solutions described in the foregoing embodiments or makeequivalent replacements to some technical features thereof, withoutdeparting from the spirit and scope of the technical solutions of theembodiments of the present invention.

What is claimed is:
 1. A data communications method in a passive opticalnetwork, comprising: receiving, by an optical line terminal (OLT), acalibration record reported by an optical network unit (ONU), whereinthe calibration record records all calibrated wavelength channels;determining, according to the calibration record, by the OLT, that atarget wavelength channel to which the ONU needs to switch is notcalibrated; sending a first message to the ONU based on the targetwavelength channel which the ONU needs to switch not being calibrated,wherein the first message comprises a forced wavelength switching flag,wherein the forced wavelength switching flag is used to instruct the ONUto calibrate the target wavelength channel and instruct the ONU toswitch to the calibrated target wavelength channel; receiving data sentby the ONU over the calibrated target wavelength channel; and sending asecond message to the ONU when an OLT-expected wavelength channel is notcalibrated, wherein the second message comprises a wavelength channelcalibration indication bit and is used to instruct the ONU to calibrateall new wavelength channels or instruct the ONU to calibrate a specifiednew wavelength channel, wherein the all new wavelength channels comprisean OLT-expected wavelength channel identified by the OLT-expectedwavelength channel ID and the specified new wavelength channel, and thespecified new wavelength channel is determined according to an ID of ato-be-calibrated wavelength channel in the second message or determinedaccording to a quantity of to-be-calibrated wavelength channels and IDsof the to-be-calibrated wavelength channels in the second message. 2.The data communications method according to claim 1, wherein the firstmessage further comprises a forced calibration flag, which is used toinstruct the ONU to switch to the target wavelength channel after allnew wavelength channels are calibrated, wherein the new wavelengthchannels are not calibrated, new wavelength channels comprise the targetwavelength channel.
 3. The data communications method according to claim1, wherein the receiving, by the OLT, the calibration record reported bythe ONU comprises: sending, by the OLT, a third message to the ONU,wherein the third message comprises a quiet window and is used toinstruct the ONU to register within the quiet window; and receiving,within the quiet window, a registration request reported by the ONU,wherein the registration request comprises a sequence number of the ONUand the calibration record.
 4. The data communications method accordingto claim 3, further comprising: sending a fourth message to the ONU whenan OLT-expected wavelength channel is not recorded in the calibrationrecord, so as to request the ONU to perform wavelength channelcalibration for a wavelength channel identified by an OLT-expectedwavelength channel ID, wherein the OLT-expected wavelength channel ID isan operating wavelength channel ID allocated by the OLT to the ONU. 5.The data communications method according to claim 1, wherein thecalibration record comprises at least one of an ID of a calibratedupstream wavelength channel and an ID of a calibrated downstreamwavelength channel.
 6. The data communications method according to claim1, wherein the calibration record further comprises at least one of aquantity of calibrated downstream wavelength channels and a quantity ofcalibrated upstream wavelength channels.
 7. The data communicationsmethod according to claim 1, further comprising: determining, by the OLTaccording to the calibration record, that an OLT-expected wavelengthchannel is calibrated; and allowing the ONU to register.
 8. A datacommunications method in a passive optical network, comprising:reporting, by an optical network unit (ONU), a calibration record to anoptical line terminal (OLT), wherein the calibration record records allcalibrated wavelength channels; receiving, by the ONU, a first messagesent by the OLT, wherein the first message comprises a forced wavelengthswitching flag; calibrating, by the ONU according to the forcedwavelength switching flag, a target wavelength channel to switch to, andswitching to the calibrated target wavelength channel; and performing,by the ONU, data communication with the OLT over the switched-to targetwavelength channel; receiving, by the ONU, a second message sent by theOLT, wherein the second message comprises a wavelength channelcalibration indication bit; and calibrating, by the ONU, all newwavelength channels according to the wavelength channel calibrationindication bit; or calibrating, by the ONU, a specified new wavelengthchannel according to the wavelength channel calibration indication bit,wherein the all new wavelength channels comprise an OLT-expectedwavelength channel identified by an OLT-expected wavelength channel IDand the specified new wavelength channel, and the specified newwavelength channel is a wavelength channel specified according to an IDof a to-be-calibrated wavelength channel in the second message or is awavelength channel specified according to a quantity of to-be-calibratedwavelength channels and IDs of the to-be-calibrated wavelength channelsin the second message.
 9. The data communications method according toclaim 8, wherein the first message further comprises a forcedcalibration flag; and the method further comprises: calibrating, by theONU, all new wavelength channels according to the forced calibrationflag, and switching to the target wavelength channel, wherein the newwavelength channels are not calibrated, and the new wavelength channelscomprise the target wavelength channel.
 10. The data communicationsmethod according to claim 8, wherein the reporting, by the ONU, thecalibration record to the OLT comprises: receiving, by the ONU, a thirdmessage sent by the OLT, wherein the third message comprises a quietwindow; sending, by the ONU within the quiet window, a registrationrequest to the OLT, wherein the registration request comprises asequence number of the ONU and the calibration record, wherein thecalibration record is generated by the ONU; and receiving, within thequiet window, the sequence number of the ONU and the calibration recordthat are reported by the ONU.
 11. The data communications methodaccording to claim 10, further comprising: receiving, by the ONU, afourth message sent by the OLT; and the method further comprises:performing, by the ONU according to the fourth message, wavelengthchannel calibration for a wavelength channel identified by anOLT-expected operating wavelength channel ID, wherein the OLT-expectedwavelength channel ID is an operating wavelength channel ID allocated bythe OLT to the ONU.
 12. A passive optical network communicationsapparatus, comprising: a transceiver; a processor; and wherein thetransceiver is configured to: receive a calibration record reported byan optical network unit (ONU), wherein the calibration record recordsall calibrated wavelength channels; send a first message to the ONUaccording to an instruction from the processor, wherein the firstmessage comprises a forced wavelength switching flag, wherein the forcedwavelength switching flag is used to instruct the ONU to calibrate atarget wavelength channel and instruct the ONU to switch to thecalibrated target wavelength channel; and receive data sent by the ONUover the calibrated target wavelength channel; and wherein the processoris configured to: when a passive optical network communicationsapparatus (OLT) determines, according to the calibration record, that atarget wavelength channel to which the ONU needs to switch is notcalibrated, instruct the transceiver to send the first message to theONU based on the target wavelength channel that the ONU needs to switchnot being calibrated; and when an OLT-expected wavelength channel is notcalibrated, instruct the transceiver to send a second message to theONU; and wherein the transceiver is further configured to send a secondmessage to the ONU according to an instruction of the processor, whereinthe first message comprises a wavelength channel calibration indicationbit and is used to instruct the ONU to calibrate all new wavelengthchannels or instruct the ONU to calibrate a specified new wavelengthchannel, wherein the all new wavelength channels comprise anOLT-expected wavelength channel identified by the OLT-expectedwavelength channel ID and the specified new wavelength channel, and thespecified new wavelength channel is determined according to an ID of ato-be-calibrated wavelength channel in the second message or determinedaccording to a quantity of to-be-calibrated wavelength channels and IDsof the to-be-calibrated wavelength channels in the second message. 13.The communications apparatus according to claim 12, wherein the firstmessage further comprises a forced calibration flag, which is used toinstruct the ONU to switch to the target wavelength channel after allnew wavelength channels are calibrated, wherein the new wavelengthchannels are not calibrated, and the new wavelength channels comprisethe target wavelength channel.
 14. The communications apparatusaccording to claim 12, wherein the transceiver is further configured to:send a third message to the ONU, wherein the third message comprises aquiet window and is used to instruct the ONU to register within thequiet window; and receive, within the quiet window, a registrationrequest reported by the ONU, wherein the registration request comprisesa sequence number of the ONU and the calibration record.
 15. Thecommunications apparatus according to claim 14, wherein the processor isfurther configured to: when an OLT-expected wavelength channel is notcalibrated, instruct the transceiver to send a fourth message to theONU; and wherein the transceiver is further configured to: according toan instruction of the processor, send the fourth message to the ONU, soas to request the ONU to perform wavelength channel calibration for awavelength channel identified by an OLT-expected wavelength channel ID,wherein the OLT-expected wavelength channel ID is an operatingwavelength channel ID allocated by the OLT to the ONU.
 16. Thecommunications apparatus according to claim 12, wherein the processor isfurther configured to determine, according to the calibration record,that an OLT-expected wavelength channel is calibrated, and then allowthe ONU to register.
 17. A passive optical network communicationsapparatus, comprising: a transceiver; and a processor, wherein theprocessor is configured to: report a calibration record to an opticalline terminal (OLT), wherein the calibration record records allcalibrated wavelength channels; receive a first message sent by the OLT,wherein the first message comprises a forced wavelength switching flag;calibrate, according to the forced wavelength switching flag, a targetwavelength channel to switch to, and switch to the calibrated targetwavelength channel; and perform, through an Optical Network Unit (ONU),data communication with the OLT over the switched-to target wavelengthchannel; wherein the transceiver is further configured to receive asecond message sent by the OLT, wherein the second message comprises awavelength channel calibration indication bit and wherein the processoris further configured to: calibrate all new wavelength channelsaccording to the wavelength channel calibration indication bit; or,calibrate a specified new wavelength channel according to the wavelengthchannel calibration indication bit, wherein the all new wavelengthchannels comprise an OLT-expected wavelength channel identified by anOLT-expected wavelength channel ID and the specified new wavelengthchannel, and the specified new wavelength channel is a wavelengthchannel specified according to an ID of a to-be-calibrated wavelengthchannel in the second message or is a wavelength channel specifiedaccording to a quantity of to-be-calibrated wavelength channels and IDsof the to-be-calibrated wavelength channels in the second message. 18.The communications apparatus according to claim 17, wherein the firstmessage further comprises a forced calibration flag; and the transceiveris configured to calibrate all new wavelength channels according to theforced calibration flag, and switch to the target wavelength channel,wherein new wavelength channel channels are not calibrated, and the newwavelength channels comprise the target wavelength channel.
 19. Thecommunications apparatus according to claim 17, wherein the transceiveris configured to: report a calibration record to the OLT, wherein thecalibration record records all calibrated wavelength channels; andreceive a first message sent by the OLT, wherein the first messagecomprises a forced wavelength switching flag.
 20. The communicationsapparatus according to claim 19, wherein the transceiver is furtherconfigured to: receive a third message sent by the OLT, wherein thethird message comprises a quiet window; send, through the ONU within thequiet window, a registration request to the OLT, wherein theregistration request comprises a sequence number of the ONU and thecalibration record, and wherein the calibration record is generated bythe ONU; and receive, within the quiet window, the sequence number ofthe ONU and the calibration record that are reported by the ONU.
 21. Thecommunications apparatus according to claim 20, wherein the transceiveris further configured to receive a fourth message sent by the OLT; andwherein the processor is further configured to perform, according to thefourth message, wavelength channel calibration for a wavelength channelidentified by an OLT-expected operating wavelength channel ID, whereinthe OLT-expected wavelength channel ID is an operating wavelengthchannel ID allocated by the OLT to the ONU.
 22. The communicationsapparatus according to claim 21, wherein the transceiver is furtherconfigured to receive a fifth message sent by the OLT, wherein the fifthmessage comprises an ONU deactivation indication bit; and wherein theprocessor is further configured to calibrate all new wavelength channelsaccording to the ONU deactivation indication bit before re-registration,wherein the new wavelength channels comprise an OLT-expected wavelengthchannel identified by an OLT-expected wavelength channel ID, wherein theOLT-expected wavelength channel ID is an operating wavelength channel IDallocated by the OLT to the ONU.
 23. A passive optical network system,comprising: a first communications apparatus and a second communicationsapparatus; wherein the first communication apparatus comprises: a firsttransceiver and a first processor, wherein the first transceiver isconfigured to: receive a calibration record reported by an opticalnetwork unit (ONU), wherein the calibration record records allcalibrated wavelength channels; send a first message to the ONUaccording to an instruction of the first processor, wherein the firstmessage comprises a forced wavelength switching flag, wherein the forcedwavelength switching flag is used to instruct the ONU to calibrate atarget wavelength channel and instruct the ONU to switch to thecalibrated target wavelength channel; and receive data sent by the ONUover the calibrated target wavelength channel; wherein the firstprocessor is configured to: when a passive optical networkcommunications apparatus determines, according to the calibrationrecord, that a target wavelength channel to which the ONU needs toswitch is not calibrated, instruct the first transceiver to send thefirst message to the ONU based on the target wavelength channel whichthe ONU needs to switch not being calibrated; wherein the firstprocessor is further configured to when an OLT-expected wavelengthchannel is not calibrated, instruct the transceiver to send a secondmessage to the ONU; and wherein the first transceiver is furtherconfigured to send a second message to the ONU according to aninstruction of the processor, wherein the first message comprises awavelength channel calibration indication bit and is used to instructthe ONU to calibrate all new wavelength channels or instruct the ONU tocalibrate a specified new wavelength channel, wherein the all newwavelength channels comprise an OLT-expected wavelength channelidentified by the OLT-expected wavelength channel ID and the specifiednew wavelength channel, and the specified new wavelength channel isdetermined according to an ID of a to-be-calibrated wavelength channelin the second message or determined according to a quantity ofto-be-calibrated wavelength channels and IDs of the to-be-calibratedwavelength channels in the second message.